import java.io.*;
import java.util.*;

public class csb {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new FileReader("E:\\img1\\a.txt"));
        BufferedWriter bw = new BufferedWriter(new FileWriter("E:\\img1\\aa.txt"));
       /* *//* ArrayList<String> list = new ArrayList<>();*//*
//        TreeMap<Integer, String> tm = new TreeMap<>();
        TreeSet<String> strings = new TreeSet<>();
        String len;
        while ((len = br.readLine()) != null) {
            String[] split = len.split("\\.");
//            tm.put(Integer.parseInt(split[0]),len);
            *//* list.add(len);*//*
            strings.add(len);
        }
        *//*Collections.sort(list, new Comparator<String>() {
            @Override
            public int compare(String o1, String o2) {
                int i = Integer.parseInt(o1.split("\\.")[0]);
                int i1 = Integer.parseInt(o2.split("\\.")[0]);
                return i-i1;
            }
        });*//*

        *//*for (String s : list) {
            bw.write(s);
            bw.newLine();
        }*//*
//        Set<Map.Entry<Integer, String>> entries = tm.entrySet();
//        for (Map.Entry<Integer, String> entry : entries) {
//            String value = entry.getValue();
//            bw.write(value);
//            bw.newLine();
//        }
        for (String string : strings) {
            bw.write(string);
            bw.newLine();
        }*/
        String lne;
        TreeMap<Integer, String> tm = new TreeMap<>();
        while ((lne=br.readLine())!=null){
            String[] split = lne.split("\\.");
            String put = tm.put(Integer.parseInt(split[0]), split[1]);
        }
        Set<Map.Entry<Integer, String>> entries = tm.entrySet();
        for (Map.Entry<Integer, String> entry : entries) {
            Integer key = entry.getKey();
            bw.write(key+"."+tm.get(key));
            bw.newLine();
        }
        br.close();
        bw.close();


    }
}
